Integrand size = 16, antiderivative size = 85 \[ \int \sqrt {a+b \tan ^2(e+f x)} \, dx=\frac {\sqrt {a-b} \arctan \left (\frac {\sqrt {a-b} \tan (e+f x)}{\sqrt {a+b \tan ^2(e+f x)}}\right )}{f}+\frac {\sqrt {b} \text {arctanh}\left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a+b \tan ^2(e+f x)}}\right )}{f} \]
arctan((a-b)^(1/2)*tan(f*x+e)/(a+b*tan(f*x+e)^2)^(1/2))*(a-b)^(1/2)/f+arct anh(b^(1/2)*tan(f*x+e)/(a+b*tan(f*x+e)^2)^(1/2))*b^(1/2)/f
Time = 0.30 (sec) , antiderivative size = 108, normalized size of antiderivative = 1.27 \[ \int \sqrt {a+b \tan ^2(e+f x)} \, dx=-\frac {\sqrt {a-b} \arctan \left (\frac {\sqrt {b}+\sqrt {b} \tan ^2(e+f x)-\tan (e+f x) \sqrt {a+b \tan ^2(e+f x)}}{\sqrt {a-b}}\right )+\sqrt {b} \log \left (-\sqrt {b} \tan (e+f x)+\sqrt {a+b \tan ^2(e+f x)}\right )}{f} \]
-((Sqrt[a - b]*ArcTan[(Sqrt[b] + Sqrt[b]*Tan[e + f*x]^2 - Tan[e + f*x]*Sqr t[a + b*Tan[e + f*x]^2])/Sqrt[a - b]] + Sqrt[b]*Log[-(Sqrt[b]*Tan[e + f*x] ) + Sqrt[a + b*Tan[e + f*x]^2]])/f)
Time = 0.24 (sec) , antiderivative size = 83, normalized size of antiderivative = 0.98, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.438, Rules used = {3042, 4144, 301, 224, 219, 291, 216}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sqrt {a+b \tan ^2(e+f x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sqrt {a+b \tan (e+f x)^2}dx\) |
\(\Big \downarrow \) 4144 |
\(\displaystyle \frac {\int \frac {\sqrt {b \tan ^2(e+f x)+a}}{\tan ^2(e+f x)+1}d\tan (e+f x)}{f}\) |
\(\Big \downarrow \) 301 |
\(\displaystyle \frac {b \int \frac {1}{\sqrt {b \tan ^2(e+f x)+a}}d\tan (e+f x)+(a-b) \int \frac {1}{\left (\tan ^2(e+f x)+1\right ) \sqrt {b \tan ^2(e+f x)+a}}d\tan (e+f x)}{f}\) |
\(\Big \downarrow \) 224 |
\(\displaystyle \frac {(a-b) \int \frac {1}{\left (\tan ^2(e+f x)+1\right ) \sqrt {b \tan ^2(e+f x)+a}}d\tan (e+f x)+b \int \frac {1}{1-\frac {b \tan ^2(e+f x)}{b \tan ^2(e+f x)+a}}d\frac {\tan (e+f x)}{\sqrt {b \tan ^2(e+f x)+a}}}{f}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {(a-b) \int \frac {1}{\left (\tan ^2(e+f x)+1\right ) \sqrt {b \tan ^2(e+f x)+a}}d\tan (e+f x)+\sqrt {b} \text {arctanh}\left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a+b \tan ^2(e+f x)}}\right )}{f}\) |
\(\Big \downarrow \) 291 |
\(\displaystyle \frac {(a-b) \int \frac {1}{1-\frac {(b-a) \tan ^2(e+f x)}{b \tan ^2(e+f x)+a}}d\frac {\tan (e+f x)}{\sqrt {b \tan ^2(e+f x)+a}}+\sqrt {b} \text {arctanh}\left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a+b \tan ^2(e+f x)}}\right )}{f}\) |
\(\Big \downarrow \) 216 |
\(\displaystyle \frac {\sqrt {a-b} \arctan \left (\frac {\sqrt {a-b} \tan (e+f x)}{\sqrt {a+b \tan ^2(e+f x)}}\right )+\sqrt {b} \text {arctanh}\left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a+b \tan ^2(e+f x)}}\right )}{f}\) |
(Sqrt[a - b]*ArcTan[(Sqrt[a - b]*Tan[e + f*x])/Sqrt[a + b*Tan[e + f*x]^2]] + Sqrt[b]*ArcTanh[(Sqrt[b]*Tan[e + f*x])/Sqrt[a + b*Tan[e + f*x]^2]])/f
3.4.2.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a , 0] || GtQ[b, 0])
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a, b}, x] && !GtQ[a, 0]
Int[1/(Sqrt[(a_) + (b_.)*(x_)^2]*((c_) + (d_.)*(x_)^2)), x_Symbol] :> Subst [Int[1/(c - (b*c - a*d)*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]
Int[((a_) + (b_.)*(x_)^2)^(p_.)/((c_) + (d_.)*(x_)^2), x_Symbol] :> Simp[b/ d Int[(a + b*x^2)^(p - 1), x], x] - Simp[(b*c - a*d)/d Int[(a + b*x^2)^ (p - 1)/(c + d*x^2), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && GtQ[p, 0] && (EqQ[p, 1/2] || EqQ[Denominator[p], 4] || (EqQ[p, 2/3] && E qQ[b*c + 3*a*d, 0]))
Int[((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[c*(ff/f) Subst[Int[(a + b* (ff*x)^n)^p/(c^2 + ff^2*x^2), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, e, f, n, p}, x] && (IntegersQ[n, p] || IGtQ[p, 0] || EqQ[n^2, 4] || EqQ[n^2, 16])
Leaf count of result is larger than twice the leaf count of optimal. \(168\) vs. \(2(73)=146\).
Time = 0.08 (sec) , antiderivative size = 169, normalized size of antiderivative = 1.99
method | result | size |
derivativedivides | \(\frac {\sqrt {b}\, \ln \left (\sqrt {b}\, \tan \left (f x +e \right )+\sqrt {a +b \tan \left (f x +e \right )^{2}}\right )}{f}-\frac {\sqrt {b^{4} \left (a -b \right )}\, \arctan \left (\frac {b^{2} \left (a -b \right ) \tan \left (f x +e \right )}{\sqrt {b^{4} \left (a -b \right )}\, \sqrt {a +b \tan \left (f x +e \right )^{2}}}\right )}{f b \left (a -b \right )}+\frac {a \sqrt {b^{4} \left (a -b \right )}\, \arctan \left (\frac {b^{2} \left (a -b \right ) \tan \left (f x +e \right )}{\sqrt {b^{4} \left (a -b \right )}\, \sqrt {a +b \tan \left (f x +e \right )^{2}}}\right )}{f \,b^{2} \left (a -b \right )}\) | \(169\) |
default | \(\frac {\sqrt {b}\, \ln \left (\sqrt {b}\, \tan \left (f x +e \right )+\sqrt {a +b \tan \left (f x +e \right )^{2}}\right )}{f}-\frac {\sqrt {b^{4} \left (a -b \right )}\, \arctan \left (\frac {b^{2} \left (a -b \right ) \tan \left (f x +e \right )}{\sqrt {b^{4} \left (a -b \right )}\, \sqrt {a +b \tan \left (f x +e \right )^{2}}}\right )}{f b \left (a -b \right )}+\frac {a \sqrt {b^{4} \left (a -b \right )}\, \arctan \left (\frac {b^{2} \left (a -b \right ) \tan \left (f x +e \right )}{\sqrt {b^{4} \left (a -b \right )}\, \sqrt {a +b \tan \left (f x +e \right )^{2}}}\right )}{f \,b^{2} \left (a -b \right )}\) | \(169\) |
1/f*b^(1/2)*ln(b^(1/2)*tan(f*x+e)+(a+b*tan(f*x+e)^2)^(1/2))-1/f*(b^4*(a-b) )^(1/2)/b/(a-b)*arctan(b^2*(a-b)/(b^4*(a-b))^(1/2)/(a+b*tan(f*x+e)^2)^(1/2 )*tan(f*x+e))+1/f*a*(b^4*(a-b))^(1/2)/b^2/(a-b)*arctan(b^2*(a-b)/(b^4*(a-b ))^(1/2)/(a+b*tan(f*x+e)^2)^(1/2)*tan(f*x+e))
Time = 0.33 (sec) , antiderivative size = 410, normalized size of antiderivative = 4.82 \[ \int \sqrt {a+b \tan ^2(e+f x)} \, dx=\left [\frac {\sqrt {b} \log \left (2 \, b \tan \left (f x + e\right )^{2} + 2 \, \sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {b} \tan \left (f x + e\right ) + a\right ) + \sqrt {-a + b} \log \left (-\frac {{\left (a - 2 \, b\right )} \tan \left (f x + e\right )^{2} + 2 \, \sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {-a + b} \tan \left (f x + e\right ) - a}{\tan \left (f x + e\right )^{2} + 1}\right )}{2 \, f}, \frac {2 \, \sqrt {a - b} \arctan \left (-\frac {\sqrt {b \tan \left (f x + e\right )^{2} + a}}{\sqrt {a - b} \tan \left (f x + e\right )}\right ) + \sqrt {b} \log \left (2 \, b \tan \left (f x + e\right )^{2} + 2 \, \sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {b} \tan \left (f x + e\right ) + a\right )}{2 \, f}, -\frac {2 \, \sqrt {-b} \arctan \left (\frac {\sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {-b}}{b \tan \left (f x + e\right )}\right ) - \sqrt {-a + b} \log \left (-\frac {{\left (a - 2 \, b\right )} \tan \left (f x + e\right )^{2} + 2 \, \sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {-a + b} \tan \left (f x + e\right ) - a}{\tan \left (f x + e\right )^{2} + 1}\right )}{2 \, f}, \frac {\sqrt {a - b} \arctan \left (-\frac {\sqrt {b \tan \left (f x + e\right )^{2} + a}}{\sqrt {a - b} \tan \left (f x + e\right )}\right ) - \sqrt {-b} \arctan \left (\frac {\sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {-b}}{b \tan \left (f x + e\right )}\right )}{f}\right ] \]
[1/2*(sqrt(b)*log(2*b*tan(f*x + e)^2 + 2*sqrt(b*tan(f*x + e)^2 + a)*sqrt(b )*tan(f*x + e) + a) + sqrt(-a + b)*log(-((a - 2*b)*tan(f*x + e)^2 + 2*sqrt (b*tan(f*x + e)^2 + a)*sqrt(-a + b)*tan(f*x + e) - a)/(tan(f*x + e)^2 + 1) ))/f, 1/2*(2*sqrt(a - b)*arctan(-sqrt(b*tan(f*x + e)^2 + a)/(sqrt(a - b)*t an(f*x + e))) + sqrt(b)*log(2*b*tan(f*x + e)^2 + 2*sqrt(b*tan(f*x + e)^2 + a)*sqrt(b)*tan(f*x + e) + a))/f, -1/2*(2*sqrt(-b)*arctan(sqrt(b*tan(f*x + e)^2 + a)*sqrt(-b)/(b*tan(f*x + e))) - sqrt(-a + b)*log(-((a - 2*b)*tan(f *x + e)^2 + 2*sqrt(b*tan(f*x + e)^2 + a)*sqrt(-a + b)*tan(f*x + e) - a)/(t an(f*x + e)^2 + 1)))/f, (sqrt(a - b)*arctan(-sqrt(b*tan(f*x + e)^2 + a)/(s qrt(a - b)*tan(f*x + e))) - sqrt(-b)*arctan(sqrt(b*tan(f*x + e)^2 + a)*sqr t(-b)/(b*tan(f*x + e))))/f]
\[ \int \sqrt {a+b \tan ^2(e+f x)} \, dx=\int \sqrt {a + b \tan ^{2}{\left (e + f x \right )}}\, dx \]
Exception generated. \[ \int \sqrt {a+b \tan ^2(e+f x)} \, dx=\text {Exception raised: ValueError} \]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(b-a>0)', see `assume?` for more details)Is
\[ \int \sqrt {a+b \tan ^2(e+f x)} \, dx=\int { \sqrt {b \tan \left (f x + e\right )^{2} + a} \,d x } \]
Timed out. \[ \int \sqrt {a+b \tan ^2(e+f x)} \, dx=\int \sqrt {b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a} \,d x \]